<template>
	<view class="content">
		<view class="status_bar">
			<!-- 这里是状态栏 -->
		</view>
		<view class="bg-card"></view>
		
		<view style="width: 100%;display: flex;justify-content: space-between;align-items: center;padding: 0 16rpx;box-sizing: border-box;">
			<view style="box-sizing: border-box;z-index: 1;" @click="goBack">
				<view style="border: 2rpx solid #E5E6E8;border-radius: 24rpx;background-color: #FFF;">
					<image style="width: 36rpx;height: 36rpx;margin: 16rpx 16rpx 4rpx;" src="/static/images/icon/left-icon.png"></image>
				</view>
			</view>
			<view style="color: #232426;font-size: 32rpx;font-weight: 500;z-index: 1;">
				OR 錢包
			</view>
			<view style="display: flex;justify-content: flex-end;align-items: center;z-index: 1;">
				<view style="margin-right: 32rpx;">
					<u-image
						src="/static/images/icon/service.png"
						width="44rpx"
						height="44rpx"
					></u-image>
				</view>
				<view>
					<u-image
						src="/static/images/icon/warning-circle-black.png"
						width="44rpx"
						height="44rpx"
					></u-image>
				</view>
			</view>
		</view>
		<view style="position: absolute;width: 100%;padding:0 32rpx;box-sizing: border-box;margin-top: 40rpx;">
			<view style="width: 100%;background-color: #FFF;border-radius: 48rpx;box-sizing: border-box;height: 485rpx;text-align: center;padding: 48rpx 32rpx;">
				<view style="color: #232426;font-size: 32rpx;">我的OR幣</view>
				<view style="color: #232426;font-size: 72rpx;margin-top: 24rpx;font-weight: 600;">{{or_price}}</view>
				<view style="color: #27C5D6;font-size: 28rpx;margin-top: 24rpx;">= NT$ {{price}}</view>
				<view style="display: flex;justify-content: center;align-items: center;padding:56rpx 0;box-sizing: border-box;">
					<view style="margin:0 16rpx;border: 2rpx solid #E5E6E8;padding: 24rpx 80rpx;border-radius: 200rpx;background-color: #FFF;font-weight: 500;color: #232426;">提領</view>
					<view style="margin:0 16rpx;border: 2rpx solid #E5E6E8;padding: 24rpx 80rpx;border-radius: 200rpx;background-color: #27C5D6;font-weight: 500;color: #FFF;">儲值</view>
				</view>
			</view>
		</view>
		
		<view style="position: absolute;width: 100%;box-sizing: border-box;margin-top: 560rpx;">
			<view class="tab-nav">
				<view :class="{'tab-nav-item-active':navTab==1,'tab-nav-item':navTab!=1}" @click="changeNav(1)">全部</view>
				<view :class="{'tab-nav-item-active':navTab==2,'tab-nav-item':navTab!=2}" @click="changeNav(2)">收入</view>
				<view :class="{'tab-nav-item-active':navTab==3,'tab-nav-item':navTab!=3}" @click="changeNav(3)">支出</view>
				<view :class="{'tab-nav-item-active':navTab==4,'tab-nav-item':navTab!=4}" @click="changeNav(4)">提領</view>
			</view>
			<view style="background-color: #fff;padding: 24rpx 20rpx;">
				<view v-for="(item,index) in list" :key="index" style="padding: 16rpx 8rpx;margin-bottom: 36rpx;">
					<view style="display: flex;justify-content: space-between;box-sizing: border-box;align-items: center;">
						<view>
							<view style="color: #808690;font-size: 24rpx;">{{item.time}}</view>
							<view v-if="item.type == 2" style="display: flex;justify-content: flex-start;align-items: center;box-sizing: border-box;margin-top: 16rpx;">
								<view style="color: #232426;font-size: 32rpx;">{{item.title}}</view>
								<view style="color: #1AAEC0;margin-left: 6rpx;font-size: 28rpx;">{{item.no}}</view>
							</view>
							<view v-else style="color: #232426;font-size: 32rpx;margin-top: 16rpx;">{{item.title}}</view>
							<view style="color: #6A707C;font-size: 24rpx;margin-top: 16rpx;max-width: 500rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{item.info}}</view>
						</view>
						<view>
							<view style="color: #232426;font-size: 32rpx;font-weight: 500;">{{item.price}}</view>
							<view v-if="item.status==1" style="color: #27C5D6;background-color: #EDF5FF;border-radius: 8rpx;padding: 8rpx;font-size: 24rpx;text-align: center;margin-top: 16rpx;">進行中</view>
							<view v-else-if="item.status==0" style="color: #6A707C;background-color: #F0F0F0;border-radius: 8rpx;padding: 8rpx;font-size: 24rpx;text-align: center;margin-top: 16rpx;">取消</view>
							<view v-else style="color: #78C629;background-color: rgba(120, 198, 41, 0.10);border-radius: 8rpx;padding: 8rpx;font-size: 24rpx;text-align: center;margin-top: 16rpx;">已確認</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				or_price:'1,000',
				price:'1,000',
				navTab:1,
				list:[],
				type1:[{
					type:1,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'申請提領:台北富邦銀行',
					no:'',
					info:'預計於 2025/01/12 完成',
					price:'+1,500',
					status:1
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100005',
					info:'尋找可靠的遛狗達人，陪伴我家的毛孩！',
					price:'-1,500',
					status:0
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100004',
					info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛,客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
					price:'+1,500',
					status:2
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100003',
					info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
					price:'+1,500',
					status:2
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100001',
					info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
					price:'+1,500',
					status:2
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100001',
					info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
					price:'+1,500',
					status:2
				},{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR200010',
					info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
					price:'+1,500',
					status:2
				}],
				type2:[{
					type:1,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'申請提領:台北富邦銀行',
					no:'',
					info:'預計於 2025/01/12 完成',
					price:'+1,500',
					status:1
				}],
				type3:[{
					type:2,//1提領,2訂單
					time:'2024/12/24 11:12',
					title:'訂單',
					no:'OR100005',
					info:'尋找可靠的遛狗達人，陪伴我家的毛孩！',
					price:'-1,500',
					status:0
				}],
				type4:[
					{
						type:2,//1提領,2訂單
						time:'2024/12/24 11:12',
						title:'訂單',
						no:'OR100004',
						info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛,客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
						price:'+1,500',
						status:2
					},{
						type:2,//1提領,2訂單
						time:'2024/12/24 11:12',
						title:'訂單',
						no:'OR100003',
						info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
						price:'+1,500',
						status:2
					},{
						type:2,//1提領,2訂單
						time:'2024/12/24 11:12',
						title:'訂單',
						no:'OR100001',
						info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
						price:'+1,500',
						status:2
					},{
						type:2,//1提領,2訂單
						time:'2024/12/24 11:12',
						title:'訂單',
						no:'OR100001',
						info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
						price:'+1,500',
						status:2
					},{
						type:2,//1提領,2訂單
						time:'2024/12/24 11:12',
						title:'訂單',
						no:'OR200010',
						info:'客製化花束，韓式浪漫氛圍束客製化花束，韓式浪漫氛',
						price:'+1,500',
						status:2
					}
				]
				
			}
		},
		onLoad(option) {
			this.list = this.type1;
		},
		methods: {
			goBack(){
				uni.navigateBack();
			},
			changeNav(type){
				this.navTab = type;
				if( type == 2 ){
					this.list = this.type2;
				} else if(type == 3){
					this.list = this.type3;
				} else if(type == 4){
					this.list = this.type4;
				} else {
					this.list = this.type1;
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		background-color: #F6F8FA;
		height: 100vh;
		
		.bg-card{
			border-radius: 0px 0px 40px 40px;
			background: linear-gradient(313deg, #55B8D9 10.88%, #77DFEA 82.74%);
			height: 480rpx;
			position: absolute;
			top: 0;
			width: 100%;
			z-index: 0;
		}
		.tab-nav{
			width: 100%;
			display: flex;
			justify-content: space-around;
			padding-top: 24rpx;
			padding-bottom: 8rpx;
			border-bottom: 2rpx solid #F6F8FA;
			background-color: #ffffff;
			
			.tab-nav-item{
				font-size: 28rpx;
				color: #808690;
				padding-bottom: 12rpx;
			}
			.tab-nav-item-active{
				font-size: 28rpx;
				color: #1AAEC0;
				padding-bottom: 12rpx;
				border-bottom: 3rpx solid #1AAEC0;
				font-weight: 500;
			}
		}
		
		
	}
	
</style>
